<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
     <div id="app">
        <h1>计数器</h1>
        <div>{{count}}</div>
        <div>
            <button v-on:click="count++">+</button>
            <button  @click="increment(2)">+2</button>
            <button  @click="increment(3)">+3</button>
            <button @click="mul">*3</button>
            <button @click="test(100,$event)">test</button>
        </div>

    

     </div>
     <script>
        const app=new Vue({
            el:"#app",
            data:{
                count:0
            },
            methods: {
                increment(arg){
                    this.count+=arg
                },
                mul(arg){
                   console.log('arg',arg.target.innerText); 
                },
                test(arg1,arg2){
                    console.log('arg1',arg1);
                    console.log('arg2',arg2);
                }
            },
        })
     </script>
</body>
</html>